@extends('layouts.app')
@include('free.sidebar')
@section('content')
    <div class="content">
        <div class="row custom-invoice">
            <br />
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>用户名</th>
                    <th>用户头像</th>
                    <th>商品名</th>
                    <th>订单ID</th>
                    <th>解锁金额</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($unlock as $item)
                    <tr>
                        <td>{{ $user->get($item->buyer_id)->nickname }}</td>
                        <td>
                            <img src="{{ $user->get($item->buyer_id)->avatar }}" width="30" />
                        </td>
                        <td>{{ $item->title }}</td>
                        <td>{{ $item->order_id }}</td>
                        <td>{{ $item->money/100 }}</td>
                        <td>{{ \App\Modules\Free\Models\UnlockRecord::$showStatus[$item->status]}}</td>
                        <td>
                            @if ($item->status == \App\Modules\Free\Models\UnlockRecord::STATUS_INIT)
                                <a class="btn btn-primary btn-xs" href="{{ route('admin.free.cancel', ['id' => $item->id]) }}"><i class="fa fa-eraser"></i> 不通过</a>
                                <a class="btn btn-primary btn-xs" href="{{ route('admin.free.pass', ['id' => $item->id]) }}"><i class="fa fa-refresh"></i> 通过</a>
                            @endif
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
@endsection
